package com.qlmjx.sevalopos.View;

import android.content.Context;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import com.qlmjx.sevalopos.R;
import com.qlmjx.sevalopos.utils.ConstantsUtils;
import com.universal.frame.generalutils.SharedPreferencesUtil;


/**
 * 退出登录
 * @author Administrator
 */
public class WareHouseDialog extends BaseDialog {

	private Button bt_ok;
	private Button bt_qx;
	private EditText ed_bz;
	private TextView tv_hm;
	private String text;

	public WareHouseDialog(Context context) {
		super(context);
		this.context = context;
	}

	public WareHouseDialog(Context context, String text, int theme, LeaveMyDialogListener listener) {
		super(context, theme,listener);
		this.context = context;
		this.listener = listener;
		this.text = text;
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.dialog_warehouse);
		this.setCanceledOnTouchOutside(false);
		TextView tv_content = (TextView) findViewById(R.id.tv_content);
		tv_hm =(TextView) findViewById(R.id.tv_hm);
		tv_content.setText(text);
		String num = SharedPreferencesUtil.getString(getContext(), ConstantsUtils.WAREHOUSE_ID);
		if ("".equals(num)||num==null){
			tv_hm.setText("还未设置仓库号");
		}else {
			tv_hm.setText(num);
		}
		bt_ok = (Button) findViewById(R.id.bt_quit_ok);
		bt_qx = (Button) findViewById(R.id.bt_quit_qx);
		ed_bz = (EditText)findViewById(R.id.ed_bz);
		bt_ok.setOnClickListener(this);
		bt_qx.setOnClickListener(this);
	}

}